package com.study.springcloud.serivce.fallback;

import com.study.springcloud.consts.Constant;
import com.study.springcloud.response.ResultObject;
import com.study.springcloud.serivce.GoodsRemoteClient;
import org.springframework.stereotype.Component;

/**
 * @Author Chen Jie
 * @Date 2022/3/18 20:47
 * @Version 1.0
 */
//需要注入到容器
@Component
public class GoodsRemoteClientFallback implements GoodsRemoteClient {
    @Override
    public ResultObject goods() {
        return new ResultObject(Constant.ERROR, String.format("feign服务调用降级...%s", this.getClass().getSimpleName()), null);
    }
}
